Repository navigation
Add a CI workflow for the mutablemaps benchmarks - #191
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a CI workflow for the mutablemaps benchmarks
Adds a manually dispatched workflow that benchmarks the verified maps against the Scala standard library and produces an HTML report:
MutableLongMapvsscala.collection.mutable.LongMapMutableHashMapvsscala.collection.mutable.HashMapandscala.collection.immutable.HashMapThe full JMH suite takes about 48 hours. This runs a time-boxed selection of it: only the implementations being compared, 6 sizes per benchmark, and shorter iterations (4 × 3 s warmup, 5 × 5 s measurement, 1 fork).
What is added
.github/workflows/mutablemaps-benchmarks.yml: runs onworkflow_dispatchwith aprofileinput (standard, orsmoketo check the pipeline in about 10 minutes). It only installs a JDK 21 and sbt; Stainless and the solvers are not needed to run the benchmarks.run_benchmarks_ci.sh: runs the three benchmark groups and writes one JMH JSON file and one log per group. It downloads the sbt-stainless plugin if it is not installed.benchmark_results/generate_benchmark_report.py: builds a self-contained HTML report (one chart per scenario, verified / standard library ratios, measurement tables) and a Markdown summary. Python standard library only.ImmutableHashMapBenchmark.scala: the three HashMap scenarios forimmutable.HashMap, on the same keys asMutableHashMapBenchmarkBig.What is changed
build.sbt: Stainless 0.10.5 with the Scala version it is built for (3.10.1-RC1-bin-20260903-e1f9361-NIGHTLY, LARA fork), set up as in ziplex.Blackholeinstead of an accumulator or a discarded value (VerifiedMapBenchmark.scala,HashMapBenchmark.scala,OtherBenchmark.scala).Main.scala: fixed two references tobenchmark.Keyandbenchmark.HashMapBenchmarkUtilBig, which live inbenchmark.maps. The sbt project did not compile without this.README.md: plugin link updated to v0.10.5, and a section on the new script and workflow.Where the report goes
The workflow uploads the HTML report, the JMH JSON results and the logs as the artifact
mutablemaps-benchmarkson the run, and writes the ratio tables to the job summary. Nothing is committed back to the repository.Duration
The
standardprofile ran locally in 2h11 before the switch toBlackhole; it has not been re-timed since. The run step is capped at 225 minutes and the job at 240. If the cap is hit, the groups that finished are still reported.Notes
smokeprofile is the quickest check.benchmark_results/were measured with the accumulator style and with Scala 3.7.2, so they are not directly comparable with new runs.